/* eslint-disable prettier/prettier */
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { HydratedDocument } from 'mongoose';
import { BaseEntity } from 'src/common/schema/baseEntity.schema';

export type DoctorDocument = HydratedDocument<Doctor>;

@Schema({
    collection: 'Doctor', // 指定集合名称
    timestamps: {
        currentTime: () => Date.now(),
        createdAt: 'createTime',
        updatedAt: 'updateTime',
    },
})
export class Doctor extends BaseEntity {
    @Prop()
    name: string;

    @Prop()
    department: string;

    @Prop()
    professionalTitle: string;

    @Prop()
    level: string;

    @Prop()
    hospital: string;

    @Prop()
    specialties: string;

    @Prop()
    star: string;

    @Prop()
    num: string;

    @Prop()
    price: string;

    @Prop()
    online: boolean;

    @Prop()
    commentId: string;
}

export const DoctorSchema = SchemaFactory.createForClass(Doctor);
